package com.yl.zqy.entity.sys;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 部门管理
 * </p>
 *
 * @author liang.yu
 * @since 2024-03-24
 */
@Getter
@Setter
@TableName("sys_dept")
@Schema(name = "SysDept对象", description = "部门管理")
public class SysDept implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @TableId("id")
    private String id;

    @Schema(description = "上级ID")
    @TableField("pid")
    private String pid;

    @Schema(description = "所有上级ID，用逗号分开")
    @TableField("pids")
    private String pids;

    @Schema(description = "部门名称")
    @TableField("name")
    private String name;

    @Schema(description = "排序")
    @TableField(value = "sort",fill = FieldFill.INSERT)
    private Integer sort;

    @Schema(description = "创建者")
    @TableField(value = "creator",fill = FieldFill.INSERT)
    private String creator;

    @Schema(description = "创建时间")
    @TableField(value = "create_date",fill = FieldFill.INSERT)
    private LocalDateTime createDate;

    @Schema(description = "更新者")
    @TableField(value = "updater",fill = FieldFill.UPDATE)
    private String updater;

    @Schema(description = "更新时间")
    @TableField(value = "update_date",fill = FieldFill.UPDATE)
    private LocalDateTime updateDate;


}
